package com.yunxin.yundubbo.util;

import io.netty.channel.Channel;

import java.util.concurrent.ConcurrentHashMap;

public class ChannelCacheUtil {
    private final static ConcurrentHashMap<String, Channel> cacheChannel=new ConcurrentHashMap<>();

    public static void setCacheHandler(String serverName,Channel channel){
        cacheChannel.put(serverName,channel);
    }

    public static Channel getCacheHandler(String serverName){
        return cacheChannel.get(serverName);
    }
}
